import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
//element语言设置
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
//暗黑模式需要的样式
import 'element-plus/theme-chalk/dark/css-vars.css'
import 'virtual:svg-icons-register' //导入svg-icon
import SvgIcons from '@/components' //引入SVGICONS库
import '@/styles/index.scss' //引入scss样式库
import router from '@/router' //引入路由
import pinia from '@/store' //引入pinia仓库
//引入自定义指令文件
import { isHasButton } from '@/directive/has'
//路由鉴权
import './permission'
//语言设置
const app = createApp(App)

app.use(ElementPlus, {
  locale: zhCn, //语言设置
})
app.use(router) //使用路由
app.use(SvgIcons) //使用svg-icon插件
app.use(pinia) //使用pinia仓库

isHasButton(app)
app.mount('#app')//挂载组件
